package com.dji.compose_learning.viewmodel

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.cachedIn
import com.dji.compose_learning.net.MyPagingSource
import com.dji.compose_learning.net.getGithubService

class LoadMoreViewModel : ViewModel() {
    val repositorPager = Pager(config = PagingConfig(pageSize = 6)){
        MyPagingSource(getGithubService(),"compose")
    }.flow.cachedIn(viewModelScope)
}